package com.missilike.api.controller;

import com.missilike.biz.IMilEquipmentService;
import com.missilike.core.domain.EquipmentRegisterRequest;
import com.missilike.core.result.CommonResult;
import com.missilike.core.utils.ResultUtils;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: starmile
 * @Description:
 * @Create: 2019-01-17 15:11
 **/
@Slf4j
@RestController
@RequestMapping("/api/equipment")
public class EquipmentController {

    @Autowired
    IMilEquipmentService iMilEquipmentService;

    @ApiOperation(value = "equipmentRegister", notes = "注册机器")
    @RequestMapping(value = "/equipmentRegister", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public CommonResult equipmentRegister(@RequestBody EquipmentRegisterRequest request) {
        Boolean result = iMilEquipmentService.equipmentRegister(request);
        return ResultUtils.ok(result);
    }
}
